﻿package org.openChart.sprite 
{
	import flash.display.Sprite;
	import org.openChart.display.DisplayStickLine;
	
	/**
	 * ...
	 * @author Chongyuan
	 */
	public class StickLineSprite extends BaseSprite
	{
		//public var line:DisplayStickLine;
		public function StickLineSprite( line:DisplayStickLine, commandHander:CommandHandler) 
		{
			super(line, commandHander)
		}
		
		public override function paint():void
		{
			var line:DisplayStickLine = this.displayObject as DisplayStickLine;
			drawLine(line.startPosition.x, line.startPosition.y, line.startPosition.x + line.broken, line.startPosition.y - line.broken, line.width, line.color, line.alpha);
			drawLine(line.startPosition.x + line.broken, line.startPosition.y - line.broken, line.endPosition.x + line.broken, line.endPosition.y - line.broken, line.width, line.color, line.alpha);
		}
		
	}
	
}